import Movie from '@/views/Movie';
import NowPlaying from '@/components/NowPlaying'
import ComingSoon from '@/components/ComingSoon'
import City from '@/components/City'
import Search from '@/components/Search'
import Detail from '@/views/Movie/Detail'
export default {
    path:'/movie',
    component:Movie,
    children:[
        {
            path:'nowplaying',
            component:NowPlaying
        },
        {
            path:'city',
            component:City
        },
        {
            path:'comingsoon',
            component:ComingSoon
        },
        {
            path:'search',
            component:Search
        },
        {
            path:'detail/1/:id',
            components:{
                default:NowPlaying,
                detail:Detail
            }
        },
        {
            path:'detail/2/:id',
            components:{
                default:ComingSoon,
                detail:Detail
            }
        },
        {
            path:'*',
            redirect:"nowplaying"
        }
    ]
}